<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width,user-scalable=0"/>
    <meta charset="UTF-8">
    <title>开始健身</title>
    <script src="__api__/js/fontSize.js"></script>
    <link rel="stylesheet" href="__api__/css/bootstrap.min.css">
    <link rel="stylesheet" href="__api__/css/reset.css">
    <link rel="stylesheet" href="__api__/css/my_main.css">
</head>
<body>
<div class="start">
    <div class="container">
        <div class="code_img">
            <img src="__api__/images/start_code.png">
            <span>点开始健身生成二维码</span>
        </div>
        <div class="start_text">
            <p>请确认已到达目的场馆再点击“开始健身”</p>
            <button class="btn btn-primary" id="sub">开始健身</button>
            <button class="btn btn-primary" id="cacel">取消健身</button>
        </div>
    </div>
</div>
</body>
<script src="__assets__/js/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
	var obj={$para};
	//console.log(obj);
	var url="{:url('api/Qrcode/createQrCode')}";
	$('#sub').click(function(){
		$.post(url,obj,function(res){
			var ob=eval('(' + res +')');
			var status=ob.status;
			if(status==1){
				var ob2=eval('(' + ob.data+')');
				var url=ob2.url;
				var address=ob2.address;
				var time=ob2.time;
				var id=ob2.id;
				window.location.href=url+"?"+"address="+address+'&time='+time+'&id='+id;
			}else{
				
			}
		})
	});
	$('#cacel').click(function(){
		var url="{:url('api/Cancle/show')}";
		var obj={$para};
		window.location.href=url+"?place_id="+obj.place_id+"&appoint_time="+obj.appoint_time+"&riqi="+obj.riqi;
	})
	
});


</script>
</html>